//
//  DCBaseSetViewController.m
//  商城
//
//  Created by runone02 on 2018/8/27.
//  Copyright © 2018年 liqiyun. All rights reserved.
//

#import "DCBaseSetViewController.h"
#import "DCTabBarController.h"

@interface DCBaseSetViewController ()

@end

@implementation DCBaseSetViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.automaticallyAdjustsScrollViewInsets = NO;
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:animated];
    [self setUpAcceptNote];
}

//切换跟控制器
- (void) setUpAcceptNote{
    WEAKSELF
    [[NSNotificationCenter defaultCenter]addObserverForName:LOGINSELECTCENTERINDEX object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * _Nonnull note) {
        weakSelf.tabBarController.selectedIndex = 4;//跳转到我的界面
    }];
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:animated];
}

- (void)dealloc{
    [[NSNotificationCenter defaultCenter]removeObserver:self];
}
@end
